/**
  * list_news Theme: ios7 style
  * Theme ID: ios7
  * Author: hzp (hzp@yunshipei.com)
  */
.am-list-news-clear {
  @list-hd-bd-color: @global-primary;
  @list-hd-text-color: @global-primary;
  @list-hd-a-color: @global-primary;

  @list-li-bd-color: @global-border;
  @list-li-icon-color: @global-icon-color; // #c2c2c2

  //默认
  @list-li-a-color: @gray-darker;
  @list-li-span-color: lighten(@gray, 20%); // #9a9a9a

  // 带摘要
  @list-li-2-a-color: @gray-darker;
  @list-li-2-text-color: lighten(@gray, 20%);
  margin: 10px;

  .am-list-news-hd {
    border-bottom: 2px solid darken(@list-li-bd-color, 5%);
    & > a {
      color: @list-hd-a-color;
      h2 {
        color: @gray-darker;
        font-weight: normal;
        font-size: 1.8rem;
        margin-bottom: 0;
      }
      .am-list-news-more {
        margin-top: 5px;
      }
    }
  }
  .am-list {
    & > li {
      position: relative;
      margin: 0;
      border: 0;
      border-bottom: 1px solid @list-li-bd-color;
      overflow: hidden;
      a {
        color: @list-li-a-color;
        padding: 1rem 0;
        font-weight: normal;
      }

      &::after {
        .am-icon-font;
        display: inline-block;
        position: absolute;
        top: 50%;
        right: 0;
        content: @fa-var-angle-right; // > 符号
        color: @list-li-icon-color;
        margin-top: -8px;
      }
    }

    & > li:last-child {
      border-bottom: 0;
    }

    //默认下
    .am-list-item-dated {
      a.am-list-item-hd {
        color: @list-li-a-color;
        .text-overflow();
        padding-right: 100px;
      }
      .am-list-date {
        top: 1.1rem;
        right: 1rem;
        color: @list-li-span-color;
      }
    }

    //带摘要
    .am-list-item-desced {
      padding: 1rem 0;

      a.am-list-item-hd {
        padding: .4rem 0;
        color: @list-li-2-a-color;
      }
      .am-list-item-text {
        color: @list-li-2-text-color;
      }
    }

    //带缩略图
    .am-list-item-thumbed {
      padding: 1rem 0;

      .am-list-thumb {
        padding-left: 0;
        vertical-align: middle;
      }

      .am-list-main {
        vertical-align: middle;
        padding-left: 0;
        .am-list-item-hd {
          display: inline-block;
          vertical-align: middle;
          font-weight: normal;
        }
      }
    }

  }
  // desc
  .am-list-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-height: 1.3em;
    .line-clamp-height(2)
  }

  // 限定缩略图高度
  .max-thumb-height(@height: 80px) {
    max-height: @height;
    overflow: hidden;
  }

  .line-clamp-height(@line) {
    -webkit-line-clamp: @line; /* number of lines to show */
    max-height: 1.3em * @line;
  }

  @media only screen and  (max-width: 639px) {
    & {
      // 缩略图在左右时限定图片高度
      .am-list-item-thumb-left, .am-list-item-thumb-right {
        .am-list-thumb {
          .max-thumb-height();
        }
      }

      // 缩略图在左右时限定图片高度
      .am-list-item-thumb-bottom-left, .am-list-item-thumb-bottom-right {
        .am-list-item-text {
          .line-clamp-height(3);
        }
        .am-list-thumb {
          .max-thumb-height(60px);
        }
      }
    }
  }

  .hook-am-list-news-clear;
}

.hook-am-list-news-clear() {
}